package com.example.carprovideruser.service.impl.hkf;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.dubbo.config.annotation.Service;
import com.example.carinterface.pojo.OwnerCard;
import com.example.carinterface.service.hkf.OwnerCardService;
import com.example.carinterface.utils.ResultJson;
import com.example.carprovideruser.mapper.hkf.OwnerCardMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Service
public class OwnerCardServiceImpl implements OwnerCardService {
    @Autowired
    OwnerCardMapper ownerCardMapper;
    @Override
    public Integer insertOwnerCard(OwnerCard ownerCard) {
        return ownerCardMapper.insertOwnerCard(ownerCard);
    }

    @Override
    public ResultJson<List> selectOwnerCard(Integer userId) {
        List<Map> list = new ArrayList<>();
        list=ownerCardMapper.selectOwnerCard(userId);
        ResultJson<List> resultJson=new ResultJson<>();
        resultJson.setSuccess("查询成功",list);
        return resultJson;
    }
}
